package com.guoqing.example;

import com.guoqing.example.service.MyService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @ClassName ShiroApplication
 * @Description TODO
 * @Author ZhangGuoQing
 * @Date 2020/8/16/0016 22:03
 * https://www.jianshu.com/p/7f724bec3dc3
 *
 * authc：所有已登陆用户可访问
 * roles：有指定角色的用户可访问，通过[ ]指定具体角色，这里的角色名称与数据库中配置一致
 * perms：有指定权限的用户可访问，通过[ ]指定具体权限，这里的权限名称与数据库中配置一致
 * anon：所有用户可访问，通常作为指定页面的静态资源时使用
 */
@Slf4j
@SpringBootApplication
//@MapperScan("com.guoqing.example.mapper")
@EnableAspectJAutoProxy(exposeProxy = true)
public class ShiroApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(ShiroApplication.class);
        log.info("\n running ShiroApplication");
        MyService bean = run.getBean(MyService.class);
        bean.insertUser();

    }

}
